<template>
  <div>
    <h2 @click="showSchoolName">学校姓名:{{ name }}</h2>
    <h2>学校地址:{{ address }}</h2>
  </div>
</template>

<script>
export default {
  name: 'School_C',
  data() {
    return {
      name: '北大',
      address: '北京'
    }
  },
  props: {
    getSchoolName:Function
  },
  methods: {
    showSchoolName() {
      this.getSchoolName(this.name)
    }
  }

}
</script>
<style scoped>


</style>